import requset from '@/utils/request'

// 页面管理

// 获取页面列表 ?${params._limit}&${params._start}&${params.title_contains}
export const getPagesList = params => requset({
  url: `/pages`,
  params
})
// 添加页面
export const setPagesList = data => requset({
  url: '/pages',
  method: 'post',
  data
})
// 删除页面
export const delPagesList = id => requset({
  url: '/pages/' + id,
  method: 'delete'
})
// 根据ID获取页面
export const setPagesId = id => requset({
  url: '/pages/' + id
})
// 根据ID编辑页面
export const editPagesId = data => requset({
  url: '/pages/' + data.id,
  method: 'put',
  data
})
// 模糊搜索页面
export const amountPagesList = params => requset({
  url: '/pages/count',
  params
})

